import service from "../../utils/request"
const api = {
    getlist:'tienchin/business/list',//获取商机管理列表
    getqudao:'tienchin/business/channels',//获取渠道来源列表
    gethuodong:'tienchin/business/activity/',//获取活动信息
    addshangji:'tienchin/business',//添加商机
    deletesj:'tienchin/business/',//删除商机
    editsj:'tienchin/business/summary/',//编辑商机回显
    editshangji:'tienchin/business',//编辑商机
    deptTreeSelect:'system/dept/treeselect',//查询部门下拉树结构
    fenpeigei:'tienchin/clue/users/',//分配给选项
    fenpei:'tienchin/assignment',//分配给
}
// 分配给
export function fenpei(data) {
  return service({
    url: api.fenpei,
    method: 'post',
    data: data
  })
}
// 分配给选项
export function fenpeigei(data) {
  return service({
    url: api.fenpeigei+data,
    method: 'get',
    // params: data
  })
}

// 查询部门下拉树结构
export function deptTreeSelect(data) {
  return service({
    url: api.deptTreeSelect,
    method: 'get',
    params: data
  })
}

// 添加商机
export function editshangji(data) {
  return service({
    url: api.editshangji,
    method: 'put',
    data: data
  })
}
// 编辑商机回显
export function editsj(data) {
  return service({
    url: api.editsj+data,
    method: 'get',
    // params: data
  })
}
// 删除商机
export function deletesj(data) {
  return service({
    url: api.deletesj+data,
    method: 'DELETE',
    // params: data
  })
}
// 添加商机
export function addshangji(data) {
  return service({
    url: api.addshangji,
    method: 'post',
    data: data
  })
}
// 获取活动信息
export function gethuodong(data) {
  return service({
    url: api.gethuodong+data,
    method: 'get',
    // params: data
  })
}
// 获取商机管理列表
export function getList(data) {
  return service({
    url: api.getlist,
    method: 'get',
    params: data
  })
}
// 获取渠道来源列表
export function getqudao(data) {
  return service({
    url: api.getqudao,
    method: 'get',
    params: data
  })
}